In the last few years, there has been an increase in cloud computing and web-based services. Representational state transfer (REST) web services are a unique kind of web services implemented using HTTP and the principles of REST which include: a stateless client-server architecture, a uniform interface, and a layered system. A REST web service follows four basic design principles: (1) it uses HTTP methods explicitly; (2) it is stateless; (3) it exposes directory structure-like URIs, and (4) it transfers data in formats such as XML and/or JavaScript Object Notation (JSON). Web service providers provide developers access to REST web service data via REST application programming interfaces (APIs).
Some REST APIs give developers access to large data graphs. A data graph is a data structure that stores data and shows relationships among data using a finite collection of points, called nodes, and lines, called edges. Relationships within a graph are represented by connecting nodes with each other using edges as depicted in FIG. 1. A graph can be rootless and can be traversed both forwards and backwards across many nodes.
In FIG. 1, there are six (6) nodes and seven (7) edges. Node 1 is only connected to Node 2. Node 2 is connected to Nodes 3, 4, and 5. Node 3 is connected to Nodes 2, 5, and 6. Node 4 is connected to Nodes 2 and 5. Node 5 is connected to Nodes 3 and 6. In this data graph, there is no direct relationship between Nodes 1 and 6. Therefore, the graph must be traversed to find a path from Node 1 to Node 6.
There are several possible ways to get from Node 1 to Node 6: (1) Node 1→Node 2→Node 3→Node 6; (2) Node 1→Node 2→Node 4→Node 5→Node 6; (3) Node 1→Node 2→Node 4→Node 5→Node 3→Node 6; and (4) Node 1→Node 2→Node 3→Node 5→Node 6. Path 1 is the most efficient path between Node 1 and Node 6 because it requires visiting the least number of nodes. Discovering the most efficient path connecting nodes is often challenging because of the numerous paths available among nodes.
Large data graphs provided by REST APIs usually contain multiple data object nodes that are interconnected, and sometimes hierarchical as depicted in FIG. 2. Most REST API providers give developers a client library or documentation which demonstrates how to retrieve data objects from their respective REST APIs. However, it is often infeasible for a developer to obtain an entire data graph in a single server call using a REST API because a graph is typically too large and interconnected. Instead, each server call will usually only bring back an individual data object node. Therefore, developers have to make repeated calls to the sever using the REST API to obtain a complete data graph. This process can be tedious and time-consuming.